package com.adingxiong.quickstart.util;

import java.util.Calendar;

/**
 * @ClassName RandomUID
 * @Description  生成随机的10数位当作id
 * @Author xiongchao
 * @Date 2020/6/9 13:59
 **/
public class RandomUID {


    public static int getUUID10 (){
        Long time = Calendar.getInstance().getTimeInMillis();
        String str = time.toString();
        return Integer.parseInt(str.substring(3));
    }

    public static int getUUID8(){
        Long time = Calendar.getInstance().getTimeInMillis();
        String str = time.toString();
        return Integer.parseInt(str.substring(5));
    }
}
